package com.cn.BigDecimalBigInteger;

import org.junit.Test;

import java.math.BigInteger;

public class BigIntegerTest {
    @Test
    public void test1(){
        BigInteger bigInteger1 = new BigInteger("12345678901234567890");
        BigInteger bigInteger2 = BigInteger.valueOf(123456789);

        int result = bigInteger1.compareTo(bigInteger2);
        if(result > 0){
            System.out.println("1 大于 2");
        } else if (result == 0) {
            System.out.println("1 等于 2");
        }else{
            System.out.println("1 小于 2");
        }
    }

    @Test
    public void test2(){

    }
}
